﻿#region Using namespaces

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;

using BOL.Apps.GeneNetworkBrowser;

#endregion

namespace BOL.Apps.GeneNetworkBrowser.ViewModels
{
    public sealed class RelationsTreeViewItemViewModel : TreeViewItemViewModel
    {
        #region TreeViewItemViewModel implementation

        public ObservableCollection<Relation> Relations { get; private set; }

        public RelationsTreeViewItemViewModel(ObservableCollection<Relation> relations, NetworkTreeViewItemViewModel tvmNetwork)
            : base(tvmNetwork, true)
        {
            Relations = relations;
            _title = "Relations";
        }

        protected override void LoadChildren()
        {
            foreach (var relation in Relations)
                base.Children.Add(new RelationTreeViewItemViewModel(relation, this));
        }

        #endregion
    }
}
